/**
 * Created by Administrator on 2017-07-20.
 */
/*管理模块js*/
(function () {
    // console.log("进入role.js");
    var modal = $('.modal');

    $("#add_new_permission").on("click", function (e) {
        // console.log("click...");
        modal.modal("show");
        return false;
    });

    $("#add_new_permission_save").on("click", function () {
        var form = $("#addRoleForm");
        $.post(form.attr("action"), form.serialize(), function (data) {
            if(data == true) {
                modal.modal("hide");
                $(Menu.container()).load("permission/permissions.do");
            }else {
                alert("添加失败，请重试。");
            }

        });
    });


})();
